Toggable DLC Maps Example

I decided to release these sample files for the map modding community so map modders can take advantage of this.

[PURPOSE]
The purpose of this is so map developers can make their maps be toggles like North Yankton. In other words, the map will not load on start up. It can be enabled via scripts. This will have many advantages.
-People can keep the original atmosphere of LS when the map isn't in use.
-Maps that have missing faces don't look very pretty when you see them far away.
-Two different maps can occupy the same space. So if two map developers use the same area to place their maps, the users can switch between them easily without reloading the game.
-A map may be placed where a mission is. It can be switched off if need be.

I included examples of toggable ymaps. I did them for most of the DLC Maps that have been released as of 5/12/2017 (I haven't done ViceV yet. I did Lake Louise, but the developer needs to move the map for this to work.)

For now, you will need to use Menyoo to toggle the maps. You can also use it to teleport to and from them when you load it.

In the future, I will write a script that will be used to manage add on maps, and allow you to travel to and from them via the airport. It will also have additional features, like controlling the wave height, or the weather. It will manage the maps, in an immersive way.







[FOR MAP DEVELOPERS]
How to create the Spooner files to load and unload the maps.
You will want two Spooner files. One that loads the map, and the other that unloads the map.
Load: Place the IPL names in the file so it looks like this. Place as many in as you need for all of the ymaps that come with the mod. My example has two ymaps. Check out my sample files if you need to see what it looks like.
	<IPLsToLoad load_mp_maps="false" load_sp_maps="false">
		<IPL>FIRST_YMAP_NAME_HERE</IPL>
		<IPL>SECOND_YMAP_NAME_HERE</IPL>
	</IPLsToLoad>

Unload: Place the IPL names in the file so it looks like this. Place as many in as you need for all of the ymaps that come with the mod. My example has two ymaps. Check out my sample files if you need to see what it looks like.
	<IPLsToRemove>
		<IPL>FIRST_YMAP_NAME_HERE</IPL>
		<IPL>SECOND_YMAP_NAME_HERE</IPL>
	</IPLsToRemove>

You can follow the example files I provided to see what it should look like.




How to make a map toggable:
YMAP Flags:
To make a regular map be disabled by default, <Flags> should be set to 1, and <ContentFlags> should be set to 65. It will look like this.
	<flags value="1"/>
	<contentFlags value="65"/>

NOTE: Some ymaps won't open in OpenIV. So you will need to extract them and decompile them with metatool. The names of the values will be hashes. Don't worry about that. You can still identify them as they will be in the same place. Just change the numbers, then recompile the ymap.

_MAINIFEST.YMF configuration:
Here you need to reference each ymap to the static colisions used for the objects spawned in that ymap. This ties the colisions to the ymap, so the colisions are only present when the ymap is loaded.
This code for this section goes in the <MapDataGroups> section of the _manifest.ymf.
The <Name> field is where the ymap name goes. The <Bounds> field is where you will list out the static colisions.
Here is an example:
	<Item>
      <Name>prologue06</Name>
      <Bounds>
        <Item>prologue06_1</Item>
        <Item>prologue06_2</Item>
        <Item>prologue06_3</Item>
        <Item>prologue06_4</Item>
        <Item>prologue06_5</Item>
        <Item>prologue06_6</Item>
      </Bounds>
      <Flags/>
      <WeatherTypes/>
      <HoursOnOff value="0"/>
    </Item>



Additional info about the YMAP Flags:
At the top of the ymap file there is a value called <flags value>. I believe that the values go something like this, biased on file names.
*0: This seems to be for maps that are constantly loaded on load.
*1: This seems to be for maps that are not loaded on startup. They need to be requested via script.
*2: This seems to be for lods that load on startup.
*3: This seems to be for map lods that are not loaded on startup. They need to be requested via script.
 
Just below that, there is another value called <contentFlags value>. I am not entirely clear on what these do, but I'll report some consistent attributes that I have noticed. Some tend to be independent of the flags value.
*73: This seems to be for interiors.
*18: This seems to be for lods.
*2: This seems to be for lods on maps that aren't loaded on startup.
*577, 513: These seem to be on ymaps labled critical.
*65, 1: I have seen this flag on maps that aren't loaded on startup. These are for regular maps.
